import { Typography } from 'antd';
import { useModel } from 'umi';

const { Title } = Typography;

export function PlankName() {
  const { plank } = useModel('bom');
  if (!plank) return;
  const { name } = plank;
  return (
    <Title
      level={5}
      style={{
        maxWidth: 256,
        margin: 0,
      }}
      ellipsis={{
        tooltip: name,
      }}
    >
      {name}
    </Title>
  );
}
